<template>
    <div style="position: relative;">
        <!-- 二级菜单选择 -->
        <flexbox :gutter="0" class="TZtitle" style="position: fixed;top: 43px;left: 0px;width: 100%;z-index:1;">
            <flexbox-item :span="1/2"><popup-radio :options="gameopt" v-model="game" class="gameBox"></popup-radio></flexbox-item>
            <flexbox-item :span="1/2"><popup-radio :options="levelmenu" v-model="level" class="gameBox"></popup-radio></flexbox-item>
        </flexbox>
        <div style="padding-top: 37px;">
            <div v-if="!betSuccess">
                <!-- 开奖信息 -->
                <div>
                    <div class="JQBox">
                        <span>{{lastPeriod}}期</span>
                        <span v-if="(game == '广东快乐十分') || (game == '重庆幸运农场') || (game == '六合彩')"><b v-for="(item,index) in ballarr" :key="index" :class="'as_'+ item">{{item}}</b></span>
                        <span v-else><b v-for="(item,index) in ballarr" :key="index" :class="'as_'+ (item > 9 ? item:'0'+item)">{{item}}</b></span>
                    </div>
                    <div class="JQBox flexbox spacebetween">
                        <div class="flexbox spacebetween">
                            <span><i class="green">{{gamedata.period}}</i>期</span>
                            <p style="margin-left: 2px;">
                                <span v-if="isopen">开奖时间:<i class="blue">{{resulttime}}</i></span>
                                <span v-if="isopen" class="red"><i>距离封盘:{{closetime}}</i></span>
                            </p>
                            <span v-if="!isopen" class="red"><i>距离开盘:{{opentime}}</i></span>
                        </div>
                        <p class="blue">{{ninetime}}秒</p>
                    </div>
                </div>
                <div v-if="!goToBet" class="text-center">
                    <!-- tab分类 -->
                    <tab v-if="(game == '山东11选5' && level == '连码') || (game == '山东11选5' && level == '直选') || (game == '广东11选5' && level == '连码') || (game == '广东11选5' && level == '直选') || (game == '江西11选5' && level == '连码') || (game == '江西11选5' && level == '直选') || (game == '广东快乐十分' && level == '连码') || (game == '重庆幸运农场' && level == '连码') || (game == '六合彩' && level == '特码') || (game == '六合彩' && level == '正码特') || (this.game == '六合彩' &&　this.level == '连肖') || (this.game == '六合彩' &&　this.level == '连尾') || (this.game == '六合彩' &&　this.level == '连码')" active-color='#f09800'>
                        <tab-item v-for="(tabs,n) in tablist" :key="n" :selected="n === tabnowInd" @on-item-click="handlers(n,tabs)">{{ tabs }}</tab-item>
                    </tab>
                    <!-- 赔率 -->
                    <p class="text-center marginTB" v-if="(game == '山东11选5' && level == '连码') || (game == '山东11选5' && level == '直选') || (game == '广东11选5' && level == '连码') || (game == '广东11选5' && level == '直选') || (game == '江西11选5' && level == '连码') || (game == '江西11选5' && level == '直选') || (game == '广东快乐十分' && level == '连码') || (game == '重庆幸运农场' && level == '连码') || (game == '六合彩' && level == '合肖') || (game == '六合彩' && level == '自选不中') || (this.game == '六合彩' && this.level == '连码')">赔率：{{tabnowRate}}</p>
                    <!-- 快速选择 -->
                    <input type="button" value="快速选择" class="quickchooseBtn" @click="quickChooseBox = true" v-if="(game == '六合彩' && level == '特码') || (game == '六合彩' && level == '正码') || (game == '六合彩' && level == '正码特')" />
                </div>
                <!-- 球号 -->
                <div class="WFbox" v-for="(item,index) in dataB" :key="index" v-if="!goToBet">
                    <div class="WFtitle flexbox spacebetween">
                        <p class="leftBtn" @click="isShowFun(index)">{{(boxIsShow.indexOf(index) == -1) ? '隐藏' : '显示'}}</p>
                        <p style="font-size: 16px;">{{item}}<span v-if="arr.length != 0" style="font-size: 12px;margin-left:3px;">[共<i style="font-style: normal;font-weight:bold;" class="red">{{betnum}}</i>注]</span></p>
                        <p class="rightBtn" @click="zeroBetFun">下注</p>
                    </div>
                    <div class="box" v-show="boxIsShow.indexOf(index) == -1">
                        
                        <div v-if="(game == '安徽快3' && level == '围骰全骰') || (game == '安徽快3' && level == '长牌') || (game == '安徽快3' && level == '短牌') || (game == '江苏快3' && level == '围骰全骰') || (game == '江苏快3' && level == '长牌') || (game == '江苏快3' && level == '短牌') || (game == '吉林快3' && level == '围骰全骰') || (game == '吉林快3' && level == '长牌') || (game == '吉林快3' && level == '短牌')">
                            <flexbox :gutter="0" wrap="wrap">
                                <flexbox-item :span="1/2" class="marginTB" v-for="(iten,ind) in dataS[index]" :key="ind">
                                    <div class="liBox flexbox spacebetween" :class=" arr.indexOf(index + ',' + ind) != -1 ? 'on' : '' " @click="chooseFun(index,ind)">
                                        <span v-for="(num,inds) in iten.value" :key="inds" :class="(iten.type == 'num') ? 'jsk' + num  : ''">{{(iten.type == 'num') ? ''  : num}}</span>
                                        <label>{{iten.rate}}</label>
                                    </div>
                                </flexbox-item>
                            </flexbox>
                        </div>
                        <div v-else-if="(game == '六合彩' && level == '特肖') || (game == '六合彩' && level == '平特一肖尾数') || (game == '六合彩' && level == '合肖') || (game == '六合彩' && level == '正肖') || (game == '六合彩' && level == '连肖') || (game == '六合彩' && level == '连尾')">
                            <flexbox :gutter="0" wrap="wrap">
                                <flexbox-item :span="1/2" class="marginTB" v-for="(iten,ind) in dataS[index]" :key="ind">
                                    <div class="liBox flexbox spacebetween" :class=" arr.indexOf(index + ',' + ind) != -1 ? 'on' : '' " @click="chooseFun(index,ind)">
                                        <span>{{iten.value}}</span>
                                        <label>{{iten.rate}}</label>
                                        <p><span v-for="(more,k) in iten.balls" :key="k" :class="['sx_' + more,iten.color[k]+'Balls']">{{more}}</span></p>
                                    </div>
                                </flexbox-item>
                            </flexbox>
                        </div>
                        <div v-else>
                            <flexbox :gutter="0" wrap="wrap">
                                <flexbox-item :span="1/3" class="marginTB" v-for="(iten,ind) in dataS[index]" :key="ind">
                                    <div class="liBox flexbox spacebetween" :class=" arr.indexOf(index + ',' + ind) != -1 ? 'on' : '' " @click="chooseFun(index,ind)">
                                        
                                        <span v-if="(game == '北京PK拾' && level == '1-10名') || (game == '幸运飞艇' && level == '1-10名')" :class="(iten.type == 'num') ? 'bjpk-ranNo-' + iten.value  : ''">{{iten.value}}</span>
                                        <span v-else-if="(game == '安徽快3' && level == '三军') || (game == '江苏快3' && level == '三军') || (game == '吉林快3' && level == '三军')"><i style="font-style: normal;" v-for="(num,inds) in iten.value" :key="inds" :class="(iten.type == 'num') ? 'jsk' + num  : ''">{{(iten.type == 'num') ? ''  : num}}</i></span>
                                        <p v-else-if="game == '六合彩'" ><span :class="['sx_' + iten.value, iten.color + 'Balls']">{{iten.value}}</span></p>
                                        <span v-else :class="(iten.type == 'num') ? (iten.value < 10) ? 'as_0'+iten.value: 'as_' + iten.value  : ''">{{iten.value}}</span>
                                        <label>{{iten.rate}}</label>
                                    </div>
                                </flexbox-item>
                            </flexbox>
                        </div>

                    </div>
                </div>
                <!-- 下注结算 -->
                <div v-if="goToBet">
                    <div class="WFtitle flexbox spacebetween">
                        <div style="font-size: 15px;">
                            合计：<span class="red" style="font-weight:bold;margin-right: 5px;">{{moneyTotal}}</span><span style="font-size: 12px;">[共<i style="font-style: normal;font-weight:bold;" class="red">{{betnum}}</i>注]</span>
                        </div>
                        <div class="flexbox spacebetween">
                            <p class="leftBtn" @click="goBetCancel">取消</p>
                            <p class="rightBtn" @click="goBetFun">确定</p>
                        </div>
                    </div>
                    <flexbox :gutter="0" class="text-center tabTitle">
                        <flexbox-item :span="4/10"><p class="text-center">玩法</p></flexbox-item>
                        <flexbox-item :span="3/10"><p class="text-center">金额</p></flexbox-item>
                        <flexbox-item :span="3/10"><p class="text-center">操作</p></flexbox-item>
                    </flexbox>
                    <flexbox :gutter="0" class="text-center tabTxt" v-for="(items,index) in arrName" :key="index">
                        <flexbox-item :span="4/10">
                            <div class="text-center" style="font-size: 12px;" :class="items.isdel ? 'deleLing line-through' : ''">
                                {{ items.item }}
                                <p class="red" style="font-weight:bold;">@{{items.rate}}</p>
                                <p v-if="betdetails.length == 0 && specialballsStr != ''">({{specialballsStr}})</p>
                                <p v-if="items.ballStr != ''">({{items.ballStr}})</p>
                                <popover placement="bottom" v-if="betdetails.length != 0">
                                    <div slot="content" class="popover-demo-content">
                                        内容：{{specialballsStr}}<span class="bolds"> [{{betdetails.length}}组]</span><br/>
                                        <div class="clearfix">
                                            <span v-for="(item,index) in betdetails" :key="index" class="blue fl" style="margin-right:5px;"><i style="font-style: normal;" class="red">{{index+1}}.  </i>{{item}}</span>
                                        </div>
                                    </div>
                                    <p class="blue">[查看明细]</p>
                                </popover>

                            </div>
                        </flexbox-item>
                        <flexbox-item :span="3/10"><input class="text-center" type="number" :readonly="items.isdel" :class="items.isdel ? 'deleLing' : ''" v-model="items.value" style="display: block;width: 100%;border-radius: 3px;border: 1px solid #ddd;padding: 4px;font-size: 12px;" /></flexbox-item>
                        <flexbox-item :span="3/10"><p class="text-center" :class="items.isdel ? 'red':'blue'" style="font-size: 12px;" @click="delBetOrder(index)">{{items.isdel ? '恢复' : '删除'}}</p></flexbox-item>
                    </flexbox>

                </div>

                <!-- 两面长龙 -->
                <LongDragon v-if="!goToBet" :gameName="game" :levelName="level" :refreshClong="refreshClong" />
            </div>
            <!-- 投注成功 -->
            <div v-if="betSuccess">
                <div class="WFtitle flexbox spacebetween">
                    <p></p>
                    <p style="font-size: 16px;">系统提示！</p>
                    <p class="rightBtn" @click="betSuccessFun">返回</p>
                </div>
                <p class="success text-center">恭喜您！投注成功！</p>
                <a class="lookbetrecord blue text-right" @click="lookbetrecordFun">查看下注明细</a>
            </div>
        </div>
        
        
        <!-- 下注金额 -->
        <x-dialog v-model="editBetMoney" class="dialog-demo">
            <div class="dialog-bet-cont flexbox spacebetween">
                <p style="font-size: 16px;">金额：</p>
                <input type="number" v-model="betmoney" style="padding: 9px 4px;font-size: 16px;border:none;border-radius:3px;" />
                <input type="button" value="下单" @click="betFun" style="padding: 10px 24px;background:#6b250b;border:none;border-radius:3px;color:#fff;" />
                <p class="vux-close" @click="editBetMoney=false" style="color:#fff;"></p>
            </div>
        </x-dialog>

        <!-- 快速选择 -->
        <x-dialog v-model="quickChooseBox" class="dialog-demo choose_dialog">

            <div>
                <p class="chooseTitle bolds">快速选择</p>
                <div class="chooseMain">
                    <x-table class="chooseTable" full-bordered>
                        <tr v-for="(item,index) in chooseData" :key="index">
                            <td v-for="i in 3" :key="i" :class="item[i-1].choose ? 'select':''" @click="quickChooseFun(item[i-1].type,index,i-1)">{{item[i-1].name}}</td>
                        </tr>
                    </x-table>
                </div>
                <div class="chooseFooter flexbox spacebetween">
                    <input type="button" class="defalutBtn" value="关闭" @click="quickCloseChooseFun" />
                    <input type="button" class="defalutBtn" value="重置" @click="quickResetChooseFun" />
                    <input type="button" class="signBtn" value="选取" @click="quickChoosedFun" />
                </div>
            </div>
            
        </x-dialog>

    </div>
</template>
<script>

    // var rateTimer = null;

    import { PopupRadio, Flexbox, FlexboxItem , XDialog, Tab, TabItem, Popover, XTable } from 'vux'
    import '../../../../assets/css/main.css'
    import {lotterytype} from '../../../../assets/js/lotterytype.js'
    export default {
        name: "Gamemain",
        props: {  //普通类型：String、Number、Boolean、Null    引用类型： Array、Object
            gameName: {  //当前游戏
                type: String,
                required: true
            },
        },
        components: {
            PopupRadio,
            Flexbox,
            FlexboxItem,
            XDialog,
            Tab,
            TabItem,
            Popover,
            XTable,
        },
        data(){
            return{
                game: '',
                gameopt: ['PC蛋蛋', '六合彩', '北京PK拾','北京快乐8','天津时时彩','安徽快3','山东11选5','幸运飞艇','广东11选5','广东快乐十分','新疆时时彩','江苏快3','江西11选5','重庆幸运农场','重庆时时彩','吉林快3'],
                level: '',
                levelmenu: [],
                levelmenu1: ['混合','特码'],
                levelmenu2: ['特码','特肖','特码头尾数','两面','色波','正码','正码特','正码1~6','平特一肖尾数','五行','合肖','正肖','总肖','自选不中','连肖','连尾','连码','过关','生肖双面'],
                levelmenu3: ['两面','1-10名','冠亚组合'],
                levelmenu4: ['两面','五行','正码'],
                levelmenu5: ['两面','1-5球','第一球','第二球','第三球','第四球','第五球'],
                levelmenu6: ['三军','围骰全骰','点数','长牌','短牌'],
                levelmenu7: ['两面','一中一','第一球','第二球','第三球','第四球','第五球','连码','直选'],
                levelmenu8: ['两面','第一球','第二球','第三球','第四球','第五球','第六球','第七球','第八球','正码','连码'],
                ischooseLevel: false,  //是否更改二级菜单
                dataB: [],  //下注一级列表数据
                dataS: [],  //下注二级列表数据
                chooseBetData: [],  //已选下注所需展示的数据
                arr: [],  //标记当前选中
                arrName: [],  //下注所需的数据
                boxIsShow: [],
                editBetMoney: false,
                betmoney: '',
                goToBet: false,  //是否下注
                gamedata: {},
                ballarr: [],  //中奖号码
                lastPeriod: '',
                moneyTotal: 0,  //总计
                betnum: 0,  //注数
                betSuccess: false,  //下注成功
                tablist: [],
                tabnowRate: '--',
                tabnowInd: 0,
                specialballs: [],  //特别类型balls
                betdetails: [],  //下注组选数据
                specialballsStr: '',
                zxarr: [],  //直选第一球
                zxarrs: [],  //直选第二球
                zxarrss: [],  //直选第三球
                zxbetnum: 0,  //连码  前二组选前三组选  直选 注数
                quickChooseBox: false,  //快速选择  显示隐藏
                chooseData: [  //快速选择
                    [{'name': '单码','type': 1,'choose': false},{'name': '小单','type': 1,'choose': false},{'name': '合单','type': 1,'choose': false}],
                    [{'name': '双码','type': 1,'choose': false},{'name': '小双','type': 1,'choose': false},{'name': '合双','type': 1,'choose': false}],
                    [{'name': '大码','type': 1,'choose': false},{'name': '大单','type': 1,'choose': false},{'name': '合大','type': 1,'choose': false}],
                    [{'name': '小码','type': 1,'choose': false},{'name': '大双','type': 1,'choose': false},{'name': '合小','type': 1,'choose': false}],
                    [{'name': '0头','type': 1,'choose': false},{'name': '0尾','type': 1,'choose': false},{'name': '5尾','type': 1,'choose': false}],
                    [{'name': '1头','type': 1,'choose': false},{'name': '1尾','type': 1,'choose': false},{'name': '6尾','type': 1,'choose': false}],
                    [{'name': '2头','type': 1,'choose': false},{'name': '2尾','type': 1,'choose': false},{'name': '7尾','type': 1,'choose': false}],
                    [{'name': '3头','type': 1,'choose': false},{'name': '3尾','type': 1,'choose': false},{'name': '8尾','type': 1,'choose': false}],
                    [{'name': '4头','type': 1,'choose': false},{'name': '4尾','type': 1,'choose': false},{'name': '9尾','type': 1,'choose': false}],
                    [{'name': '鼠','type': 2,'choose': false},{'name': '龙','type': 2,'choose': false},{'name': '猴','type': 2,'choose': false}],
                    [{'name': '牛','type': 2,'choose': false},{'name': '蛇','type': 2,'choose': false},{'name': '鸡','type': 2,'choose': false}],
                    [{'name': '虎','type': 2,'choose': false},{'name': '马','type': 2,'choose': false},{'name': '狗','type': 2,'choose': false}],
                    [{'name': '兔','type': 2,'choose': false},{'name': '羊','type': 2,'choose': false},{'name': '猪','type': 2,'choose': false}],
                    [{'name': '红','type': 1,'choose': false},{'name': '绿','type': 1,'choose': false},{'name': '蓝','type': 1,'choose': false}],
                    [{'name': '红单','type': 1,'choose': false},{'name': '绿单','type': 1,'choose': false},{'name': '蓝单','type': 1,'choose': false}],
                    [{'name': '红双','type': 1,'choose': false},{'name': '绿双','type': 1,'choose': false},{'name': '蓝双','type': 1,'choose': false}],
                    [{'name': '红大','type': 1,'choose': false},{'name': '绿大','type': 1,'choose': false},{'name': '蓝大','type': 1,'choose': false}],
                    [{'name': '红小','type': 1,'choose': false},{'name': '绿小','type': 1,'choose': false},{'name': '蓝小','type': 1,'choose': false}],
                    [{'name': '全选','type': 1,'choose': false},{'name': '反选','type': 1,'choose': false},{'name': '取消','type': 1,'choose': false}],
                ],
                nowChoosedArr: [],  //快速选择  当前选中项
                isZero: false,  //是否清空
                shengxiao: ['鼠','牛','虎','兔','龙','蛇','马','羊','猴','鸡','狗','猪'],
                itemname: '',  //合肖  几肖
                signarr: [],  //过关    第一个下标
                warr: [],  //过关    第二个下标
                isopen: true,  //是否开盘
                closetime: '',  //封盘  时间  分秒
                resulttime: '',  //开奖  时间  分秒
                opentime: '',  //开盘  时间  时分秒
                ninetime: 90,  //90秒倒计时
                againNine: false,  //90m刷新
                noBet: false,  //不可下注
                refreshClong: 0,  //刷新两面长龙
                times: '',  //开奖 定时器
                timess: '',  //开盘封盘 定时器
                ninetimeset: '',  //90s定时器
                rateTimer: 0,  //赔率定时器
            }
        },
        methods: {
            init(){

                this.gameopt = window.localStorage.gameList.split(',');

                this.game = this.gameName;
                this.levelList(this.game);
                this.level = this.levelmenu[0];
                
                //当前标题
                this.$emit('getTit',this.game + ' - ' + this.level);
                this.dataB = lotterytype.dataTB(this.game,this.level).dataB;
                this.dataS = lotterytype.dataTB(this.game,this.level).dataS;
                this.dataFun();
                this.rateSetInterval();

                 if(this.game == '六合彩' &&　this.level == '特码'){
                        
                    this.tablist = ['特码A','特码B'];
                    this.tabnowRate = '--';
                    this.tabnowInd = 0;
                    
                }else{
                    this.tablist = [];
                }
                
            },
 //对应当前二级菜单
            levelList(name){
                switch(name){
                    case 'PC蛋蛋':
                        this.levelmenu = this.levelmenu1;
                        break;
                    case '六合彩':
                        this.levelmenu = this.levelmenu2;
                        break;
                    case '北京PK拾':
                        this.levelmenu = this.levelmenu3;
                        break;
                    case '北京快乐8':
                        this.levelmenu = this.levelmenu4;
                        break;
                    case '天津时时彩':
                        this.levelmenu = this.levelmenu5;
                        break;
                    case '安徽快3':
                        this.levelmenu = this.levelmenu6;
                        break;
                    case '山东11选5':
                        this.levelmenu = this.levelmenu7;
                        break;
                    case '幸运飞艇':
                        this.levelmenu = this.levelmenu3;
                        break;
                    case '广东11选5':
                        this.levelmenu = this.levelmenu7;
                        break;
                    case '广东快乐十分':
                        this.levelmenu = this.levelmenu8;
                        break;
                    case '新疆时时彩':
                        this.levelmenu = this.levelmenu5;
                        break;
                    case '江苏快3':
                        this.levelmenu = this.levelmenu6;
                        break;
                    case '江西11选5':
                        this.levelmenu = this.levelmenu7;
                        break;
                    case '重庆幸运农场':
                        this.levelmenu = this.levelmenu8;
                        break;
                    case '重庆时时彩':
                        this.levelmenu = this.levelmenu5;
                        break;
                    case '吉林快3':
                        this.levelmenu = this.levelmenu6;
                        break;
                    
                }
            },
            //赔率定时器
            rateSetInterval(noNine){

                var _this = this;

                if(window.localStorage.Authorizations){

                    if((_this.game == '北京PK拾' &&　_this.level == '1-10名') || (_this.game == '幸运飞艇' &&　_this.level == '1-10名') || (_this.game == '天津时时彩' &&　_this.level == '1-5球') || (_this.game == '新疆时时彩' &&　_this.level == '1-5球') || (_this.game == '重庆时时彩' &&　_this.level == '1-5球')){
                        var url = '/api/game/listRate/' + _this.game + '/单号' + 'mobileoa18';
                        var suburl = '/api/setting/rateItem/' + _this.game + '/单号' + 'mobileoa18';
                    }else if(_this.game == '六合彩' && _this.level == '特码'){
                        
                        if(_this.tabnowInd == 0){  //特码A
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '_mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '_mobileoa18';
                        }else if(_this.tabnowInd == 1){  //特码B
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '_特码Bmobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '_特码Bmobileoa18';
                        }
                        
                    }else if(_this.game == '六合彩' && _this.level == '正码特'){
                        if(_this.tabnowInd == 0){  //正一特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + 'mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + 'mobileoa18';
                        }else if(_this.tabnowInd == 1){  //正二特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '正二特mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '正二特mobileoa18';
                        }else if(_this.tabnowInd == 2){  //正三特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '正三特mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '正三特mobileoa18';
                        }else if(_this.tabnowInd == 3){  //正四特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '正四特mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '正四特mobileoa18';
                        }else if(_this.tabnowInd == 4){  //正五特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '正五特mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '正五特mobileoa18';
                        }else if(_this.tabnowInd == 5){  //正六特
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '正六特mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '正六特mobileoa18';
                        }
                    }else if(_this.game == '六合彩' && _this.level == '连肖'){

                        if(_this.tabnowInd == 0){  //二肖连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + 'mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + 'mobileoa18';
                        }else if(_this.tabnowInd == 1){  //三肖连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '三肖连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '三肖连中mobileoa18';
                        }else if(_this.tabnowInd == 2){  //四肖连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '四肖连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '四肖连中mobileoa18';
                        }else if(_this.tabnowInd == 3){  //五肖连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '五肖连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '五肖连中mobileoa18';
                        }else if(_this.tabnowInd == 4){  //二肖连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '二肖连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '二肖连不中mobileoa18';
                        }else if(_this.tabnowInd == 5){  //三肖连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '三肖连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '三肖连不中mobileoa18';
                        }else if(_this.tabnowInd == 6){  //四肖连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '四肖连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '四肖连不中mobileoa18';
                        }else if(_this.tabnowInd == 7){  //五肖连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '五肖连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '五肖连不中mobileoa18';
                        }

                    }else if(_this.game == '六合彩' && _this.level == '连尾'){

                        if(_this.tabnowInd == 0){  //二尾连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + 'mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + 'mobileoa18';
                        }else if(_this.tabnowInd == 1){  //三尾连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '三尾连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '三尾连中mobileoa18';
                        }else if(_this.tabnowInd == 2){  //四尾连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '四尾连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '四尾连中mobileoa18';
                        }else if(_this.tabnowInd == 3){  //五尾连中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '五尾连中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '五尾连中mobileoa18';
                        }else if(_this.tabnowInd == 4){  //二尾连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '二尾连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '二尾连不中mobileoa18';
                        }else if(_this.tabnowInd == 5){  //三尾连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '三尾连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '三尾连不中mobileoa18';
                        }else if(_this.tabnowInd == 6){  //四尾连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '四尾连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '四尾连不中mobileoa18';
                        }else if(_this.tabnowInd == 7){  //五尾连不中
                            var url = '/api/game/listRate/' + _this.game + '/' + _this.level + '五尾连不中mobileoa18';
                            var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + '五尾连不中mobileoa18';
                        }

                    }else{
                        var url = '/api/game/listRate/' + _this.game + '/' + _this.level + 'mobileoa18';
                        var suburl = '/api/setting/rateItem/' + _this.game + '/' + _this.level + 'mobileoa18';
                    }

                    _this.$httpGet(url).then(response => {
                        // console.log(response);
                        if(response.status == 200){
                            
                            
                            clearInterval(_this.times);
                            clearInterval(_this.timess);

                            if(response.data.state == 'empty'){  //尚未开盘
                                _this.noBet = true;
                                _this.isopen = false;

                                _this.opentime = _this.transformationDay( parseInt(response.data.next_open) - parseInt(response.data.server_time) );  //开盘时间

                                //倒数
                                _this.hourFun();

                            }else{
                                _this.isopen = true;
                                _this.noBet = false;

                                //时间戳转 天、时、分、秒
                                _this.closetime = _this.transformationDay( parseInt(response.data.suspend) - parseInt(response.data.server_time) );  //距离封盘
                                _this.resulttime = _this.transformationDay( parseInt(response.data.close) - parseInt(response.data.server_time) );  //距离开盘

                                //倒数
                                _this.dayFun();
                                
                                if(!noNine && (_this.ninetimeset == '')){
                                    _this.nineinit();
                                }
                                

                            }
                            
                            _this.gamedata = response.data;  //所有数据
                            //中奖号码
                            _this.ballarr = response.data.result.balls.split(',');
                            //开奖期号
                            _this.lastPeriod = response.data.result.period;

                            //修改默认赔率
                            if((_this.game == '山东11选5' &&　_this.level == '连码') || (_this.game == '广东11选5' &&　_this.level == '连码') || (_this.game == '江西11选5' &&　_this.level == '连码')){

                                _this.tabnowRate = _this.gamedata.rates['选号:任选二:$fn'];

                            }else if((_this.game == '山东11选5' &&　_this.level == '直选') || (_this.game == '广东11选5' &&　_this.level == '直选') || (_this.game == '江西11选5' &&　_this.level == '直选')){

                                _this.tabnowRate = _this.gamedata.rates['选号:前二直选:$fn'];

                            }else if((_this.game == '广东快乐十分' &&　_this.level == '连码') || (_this.game == '重庆幸运农场' &&　_this.level == '连码')){

                                _this.tabnowRate = _this.gamedata.rates['连码:任选二:$fn'];

                            }else if(_this.game == '六合彩' && _this.level == '连码'){

                                _this.tabnowRate = _this.gamedata.rates['连码:二全中:$fn'];

                            }else{

                                if(JSON.stringify(response.data.rates) != '{}'){
                                    for(let i = 0; i<_this.dataS.length; i++){
                                
                                        for(let j = 0; j<_this.dataS[i].length; j++){

                                            _this.dataS[i][j].rate = response.data.rates[_this.dataS[i][j].typeName + ':' +_this.dataS[i][j].groupName + ':' +_this.dataS[i][j].name];

                                        }

                                    }
                                }
                                
                            }

                            if(response.data.need){
                                _this.$httpPost(suburl).then(response => {
                                
                                    if(response.status == 200){
                                        
                                    }

                                });
                            }

                        }

                    });

                }

            },
            //赔率
            dataFun(){

                var _this = this;

                console.log('----------',_this.game,_this.level);

                

                if(window.localStorage.Authorizations){

                    clearInterval(_this.rateTimer);

                    _this.rateTimer = setInterval(() => {

                            _this.rateSetInterval();
                        

                    }, 10 * 1000)

                }

            },
             //选择下注项
            chooseFun(index,ind){

                var item = this.dataS[index][ind].typeName + '[' + this.dataS[index][ind].groupName +']' + '['+ this.dataS[index][ind].name +']';
                var rate = this.dataS[index][ind].rate;

                if(this.arr.indexOf(index + ',' + ind) == -1){
                    
                    if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){

                        if(this.tabnowInd == 0){
                            var typename = '任选二';

                            if(this.arr.length > 1){
                                this.$vux.toast.text('不允许超过2个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 1){
                            var typename = '任选三';

                            if(this.arr.length > 2){
                                this.$vux.toast.text('不允许超过3个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 2){
                            var typename = '任选四';

                            if(this.arr.length > 3){
                                this.$vux.toast.text('不允许超过4个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 3){
                            var typename = '任选五';

                            if(this.arr.length > 4){
                                this.$vux.toast.text('不允许超过5个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 4){
                            var typename = '任选六';

                            if(this.arr.length > 5){
                                this.$vux.toast.text('不允许超过6个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 5){
                            var typename = '任选七';

                            if(this.arr.length > 6){
                                this.$vux.toast.text('不允许超过7个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 6){
                            var typename = '任选八';

                            if(this.arr.length > 7){
                                this.$vux.toast.text('不允许超过8个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 7){
                            var typename = '前二组选';

                            if(this.arr.length > 4){
                                this.$vux.toast.text('不允许超过5个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 8){
                            var typename = '前三组选';

                            if(this.arr.length > 4){
                                this.$vux.toast.text('不允许超过5个选项','middle');
                                return;
                            }
                        }

                        this.arr.push(index + ',' + ind);
                        
                        this.specialballs.push(parseInt(ind) + 1);
                        this.specialballsStr = this.specialballs.join(',');

                    }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){

                        if(this.tabnowInd == 0){  //前二直选
                            if(index == 0){

                                if(this.arr.indexOf(1 + ',' + ind) == -1){
                                    this.arr.push(index + ',' + ind);
                                    this.zxarr.push(ind+1);
                                }

                            }else if(index == 1){
                                if(this.arr.indexOf(0 + ',' + ind) == -1){
                                    this.arr.push(index + ',' + ind);
                                    this.zxarrs.push(ind+1);
                                }
                            }
                            
                            this.zxbetnum = 0;
                            for(let onum in this.zxarr){
                                
                                for(let tnum in this.zxarrs){
                                    this.zxbetnum++;
                                }
                            }
                        }else if(this.tabnowInd == 1){  //前三直选

                            if(index == 0){
                                if((this.arr.indexOf(1 + ',' + ind) == -1) && (this.arr.indexOf(2 + ',' + ind) == -1)){
                                    this.arr.push(index + ',' + ind);
                                    this.zxarr.push(ind+1);
                                }
                            }else if(index == 1){
                                if((this.arr.indexOf(0 + ',' + ind) == -1) && (this.arr.indexOf(2 + ',' + ind) == -1)){
                                    this.arr.push(index + ',' + ind);
                                    this.zxarrs.push(ind+1);
                                }
                            }else if(index == 2){
                                if((this.arr.indexOf(0 + ',' + ind) == -1) && (this.arr.indexOf(1 + ',' + ind) == -1)){
                                    this.arr.push(index + ',' + ind);
                                    this.zxarrss.push(ind+1);
                                }
                            }

                            this.zxbetnum = 0;
                            for(let onum in this.zxarr){
                                
                                for(let tnum in this.zxarrs){

                                    for(let thnum in this.zxarrss){

                                        this.zxbetnum++;
                                    }
                                    
                                }
                            }

                        }
                        

                    }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码')){
                        if(this.tabnowInd == 0){
                            var typename = '任选二';

                            if(this.arr.length > 6){
                                this.$vux.toast.text('不允许超过7个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 1){
                            var typename = '选二连组';

                            if(this.arr.length > 6){
                                this.$vux.toast.text('不允许超过7个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 2){
                            var typename = '任选三';

                            if(this.arr.length > 6){
                                this.$vux.toast.text('不允许超过7个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 3){
                            var typename = '选三前组';

                            if(this.arr.length > 6){
                                this.$vux.toast.text('不允许超过7个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 4){
                            var typename = '任选四';

                            if(this.arr.length > 4){
                                this.$vux.toast.text('不允许超过5个选项','middle');
                                return;
                            }
                        }else if(this.tabnowInd == 5){
                            var typename = '任选五';

                            if(this.arr.length > 4){
                                this.$vux.toast.text('不允许超过5个选项','middle');
                                return;
                            }
                        }

                        this.arr.push(index + ',' + ind);
                        
                        this.specialballs.push((parseInt(ind) + 1) > 9 ? (parseInt(ind) + 1) : '0' + (parseInt(ind) + 1));
                        this.specialballsStr = this.specialballs.join(',');
                    }else if(this.game == '六合彩' && this.level == '合肖'){

                        if(this.arr.length > 10){
                            this.$vux.toast.text('不允许超过11个选项','middle');
                            return;
                        }

                        this.arr.push(index + ',' + ind);
                        
                        this.specialballs.push(this.shengxiao[ind]);
                        this.specialballsStr = this.specialballs.join(',');

                    }else if(this.game == '六合彩' && this.level == '自选不中'){

                        if(this.arr.length > 16){
                            this.$vux.toast.text('不允许超过17个选项','middle');
                            return;
                        }

                        this.arr.push(index + ',' + ind);
                        
                        this.specialballs.push((parseInt(ind) + 1) > 9 ? (parseInt(ind) + 1) : '0' + (parseInt(ind) + 1));
                        this.specialballsStr = this.specialballs.join(',');

                    }else if((this.game == '六合彩' && this.level == '连肖') || (this.game == '六合彩' && this.level == '连尾')){

                        if(this.arr.length > 8){
                            this.$vux.toast.text('不允许超过9个选项','middle');
                            return;
                        }
                        
                        this.arr.push(index + ',' + ind);
                        if(this.game == '六合彩' && this.level == '连肖'){
                            this.specialballs.push(this.shengxiao[ind]);
                        }else if(this.game == '六合彩' && this.level == '连尾'){
                            this.specialballs.push(ind);
                        }
                        
                        this.specialballsStr = this.specialballs.join(',');
                        
                    }else if(this.game == '六合彩' && this.level == '连码'){

                        if(this.arr.length > 9){
                            this.$vux.toast.text('不允许超过10个选项','middle');
                            return;
                        }

                        this.arr.push(index + ',' + ind);
                        
                        this.specialballs.push((parseInt(ind) + 1) > 9 ? (parseInt(ind) + 1) : '0' + (parseInt(ind) + 1));
                        this.specialballsStr = this.specialballs.join(',');

                    }else if(this.game == '六合彩' && this.level == '过关'){

                        this.arr.push(index + ',' + ind);
                        var nameval = this.dataS[index][ind].name;
                        this.specialballs.push(nameval);

                        this.signarr = [];
                        this.warr = [];
                        for(let i in this.arr){
                            var val = this.arr[i].split(',')[0];
                            var valw = this.arr[i].split(',')[1];
                        
                            if(this.signarr.indexOf(val) == -1){
                                this.signarr.push(val);
                                this.warr.push(valw);
                                
                            }else{
                                this.warr.push(valw);
                                this.arr.splice(this.arr.indexOf(index + ',' + this.warr[this.signarr.indexOf(val)]) , 1);
                                this.specialballs.splice(this.signarr.indexOf(val) , 1);
                                this.warr.splice(this.signarr.indexOf(val) , 1);
                            }
                            
                        }
                        this.specialballsStr = this.specialballs.join(',');
                        
                    }else{
                        this.arr.push(index + ',' + ind);
                        this.arrName.push({'item': item, 'rate': rate, 'value': 0,'isdel': false,'index': index,'ind': ind, 'balls': [],'ballStr': ''});
                    }

                    
                }else{
                    
                    this.arr.splice(this.arr.indexOf(index + ',' + ind),1);

                    if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){

                        this.specialballs.splice(this.specialballs.indexOf(parseInt(ind) + 1),1);
                        this.specialballsStr = this.specialballs.join(',');

                    }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){
                        
                    }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码') || (this.game == '六合彩' && this.level == '自选不中') || (this.game == '六合彩' && this.level == '连码')){

                        this.specialballs.splice(this.specialballs.indexOf((parseInt(ind) + 1) > 9 ? (parseInt(ind) + 1) : '0' + (parseInt(ind) + 1)),1);
                        this.specialballsStr = this.specialballs.join(',');

                    }else if((this.game == '六合彩' && this.level == '合肖') || (this.game == '六合彩' && this.level == '连肖')){

                        this.specialballs.splice(this.specialballs.indexOf(this.shengxiao[ind]),1);
                        this.specialballsStr = this.specialballs.join(',');
                    }else if(this.game == '六合彩' && this.level == '连尾'){

                        this.specialballs.splice(this.specialballs.indexOf(ind),1);
                        this.specialballsStr = this.specialballs.join(',');

                    }else if(this.game == '六合彩' && this.level == '过关'){

                        var sub = this.signarr.indexOf(index.toString());
                        this.signarr.splice(sub , 1);
                        this.warr.splice(sub , 1);
                        this.specialballs.splice(this.specialballs.indexOf(this.dataS[index][ind].name),1);
                        this.specialballsStr = this.specialballs.join(',');

                    }else{
                        for(let i=0;i<this.arrName.length;i++){
                            if(this.arrName[i].item == item){
                                this.arrName.splice(i,1);
                            }
                        }
                    }
                    
                }
                // console.log('---------------------',this.zxbetnum);

                //处理注数 (六合彩-合肖、自选不中  赔率)
                if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){

                    this.zxbetnum = 0;
                    if(this.tabnowInd == 7){  //前二组选
                        // (n-1) * n/2
                        this.betnum = (this.arr.length-1)*this.arr.length/2; 

                    }else if(this.tabnowInd == 8){  //前三组选

                        this.betnumthreeFun();

                    }else{
                        this.betnum = this.arr.length;
                    }

                }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){
                    
                    this.betnum = this.zxbetnum;

                }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码')){
                    this.zxbetnum = 0;
                    this.betnum = 0;
                    if((this.tabnowInd == 0) || (this.tabnowInd == 1)){  //任选二、选二连组
                        // (n-1) * n/2
                        this.betnum = (this.arr.length-1)*this.arr.length/2; 

                    }else if((this.tabnowInd == 2) || (this.tabnowInd == 3)){  //任选三、选三前选

                        this.betnumthreeFun();

                    }else if(this.tabnowInd == 4){

                        this.betnumfourFun();

                    }else if(this.tabnowInd == 5){

                        if(this.arr.length >= 5){
                            
                            this.betnum = 1;
                        }
                    }
                }else if(this.game == '六合彩' && this.level == '合肖'){
                    if((this.arr.length == 0) || (this.arr.length == 1)){
                        this.betnum = 0;
                        this.tabnowRate = '--';
                        this.itemname = '';
                    }else if(this.arr.length == 2){
                        this.betnum = 1;
                        this.itemname = '二肖';
                        this.tabnowRate = '[二肖] ~ ' + this.gamedata.rates['特码:合肖:二肖'];
                    }else if(this.arr.length == 3){
                        this.betnum = 1;
                        this.itemname = '三肖';
                        this.tabnowRate = '[三肖] ~ ' + this.gamedata.rates['特码:合肖:三肖'];
                    }else if(this.arr.length == 4){
                        this.betnum = 1;
                        this.itemname = '四肖';
                        this.tabnowRate = '[四肖] ~ ' + this.gamedata.rates['特码:合肖:四肖'];
                    }else if(this.arr.length == 5){
                        this.betnum = 1;
                        this.itemname = '五肖';
                        this.tabnowRate = '[五肖] ~ ' + this.gamedata.rates['特码:合肖:五肖'];
                    }else if(this.arr.length == 6){
                        this.betnum = 1;
                        this.itemname = '六肖';
                        this.tabnowRate = '[六肖] ~ ' + this.gamedata.rates['特码:合肖:六肖'];
                    }else if(this.arr.length == 7){
                        this.betnum = 1;
                        this.itemname = '七肖';
                        this.tabnowRate = '[七肖] ~ ' + this.gamedata.rates['特码:合肖:七肖'];
                    }else if(this.arr.length == 8){
                        this.betnum = 1;
                        this.itemname = '八肖';
                        this.tabnowRate = '[八肖] ~ ' + this.gamedata.rates['特码:合肖:八肖'];
                    }else if(this.arr.length == 9){
                        this.betnum = 1;
                        this.itemname = '九肖';
                        this.tabnowRate = '[九肖] ~ ' + this.gamedata.rates['特码:合肖:九肖'];
                    }else if(this.arr.length == 10){
                        this.betnum = 1;
                        this.itemname = '十肖';
                        this.tabnowRate = '[十肖] ~ ' + this.gamedata.rates['特码:合肖:十肖'];
                    }else if(this.arr.length == 11){
                        this.betnum = 1;
                        this.itemname = '十一肖';
                        this.tabnowRate = '[十一肖] ~ ' + this.gamedata.rates['特码:合肖:十一肖'];
                    }
                }else if(this.game == '六合彩' && this.level == '自选不中'){
                    if((this.arr.length == 0) || (this.arr.length == 1) || (this.arr.length == 2) || (this.arr.length == 3) || (this.arr.length == 4)){
                        this.betnum = 0;
                        this.tabnowRate = '--';
                        this.itemname = '';
                    }else if(this.arr.length == 5){
                        this.betnum = 1;
                        this.itemname = '五不中';
                        this.tabnowRate = '[五不中] ~ ' + this.gamedata.rates['七码:自选不中:五不中'];
                    }else if(this.arr.length == 6){
                        this.betnum = 1;
                        this.itemname = '六不中';
                        this.tabnowRate = '[六不中] ~ ' + this.gamedata.rates['七码:自选不中:六不中'];
                    }else if(this.arr.length == 7){
                        this.betnum = 1;
                        this.itemname = '七不中';
                        this.tabnowRate = '[七不中] ~ ' + this.gamedata.rates['七码:自选不中:七不中'];
                    }else if(this.arr.length == 8){
                        this.betnum = 1;
                        this.itemname = '八不中';
                        this.tabnowRate = '[八不中] ~ ' + this.gamedata.rates['七码:自选不中:八不中'];
                    }else if(this.arr.length == 9){
                        this.betnum = 1;
                        this.itemname = '九不中';
                        this.tabnowRate = '[九不中] ~ ' + this.gamedata.rates['七码:自选不中:九不中'];
                    }else if(this.arr.length == 10){
                        this.betnum = 1;
                        this.itemname = '十不中';
                        this.tabnowRate = '[十不中] ~ ' + this.gamedata.rates['七码:自选不中:十不中'];
                    }else if(this.arr.length == 11){
                        this.betnum = 1;
                        this.itemname = '十一不中';
                        this.tabnowRate = '[十一不中] ~ ' + this.gamedata.rates['七码:自选不中:十一不中'];
                    }else if(this.arr.length == 12){
                        this.betnum = 1;
                        this.itemname = '十二不中';
                        this.tabnowRate = '[十二不中] ~ ' + this.gamedata.rates['七码:自选不中:十二不中'];
                    }else if(this.arr.length == 13){
                        this.betnum = 1;
                        this.itemname = '十三不中';
                        this.tabnowRate = '[十三不中] ~ ' + this.gamedata.rates['七码:自选不中:十三不中'];
                    }else if(this.arr.length == 14){
                        this.betnum = 1;
                        this.itemname = '十四不中';
                        this.tabnowRate = '[十四不中] ~ ' + this.gamedata.rates['七码:自选不中:十四不中'];
                    }else if(this.arr.length == 15){
                        this.betnum = 1;
                        this.itemname = '十五不中';
                        this.tabnowRate = '[十五不中] ~ ' + this.gamedata.rates['七码:自选不中:十五不中'];
                    }else if(this.arr.length == 16){
                        this.betnum = 1;
                        this.itemname = '十六不中';
                        this.tabnowRate = '[十六不中] ~ ' + this.gamedata.rates['七码:自选不中:十六不中'];
                    }else if(this.arr.length == 17){
                        this.betnum = 1;
                        this.itemname = '十七不中';
                        this.tabnowRate = '[十七不中] ~ ' + this.gamedata.rates['七码:自选不中:十七不中'];
                    }
                }else if((this.game == '六合彩' && this.level == '连肖') || (this.game == '六合彩' && this.level == '连尾')){
                    
                    this.betnum = 0;
                    if((this.tabnowInd == 0) || (this.tabnowInd == 4)){  //二肖连中、二肖连不中

                        this.betnum = (this.arr.length-1)*this.arr.length/2;

                    }else if((this.tabnowInd == 1) || (this.tabnowInd == 5)){  //三肖连中、三肖连不中

                        this.betnumthreeFun();

                    }else if((this.tabnowInd == 2) || (this.tabnowInd == 6)){  //四肖连中、四肖连不中

                        this.betnumfourFun();

                    }else if((this.tabnowInd == 3) || (this.tabnowInd == 7)){  //五肖连中、五肖连不中

                        this.betnumfiveFun();

                    }
                }else if(this.game == '六合彩' && this.level == '连码'){
                    
                    this.betnum = 0;
                    if((this.tabnowInd == 0) || (this.tabnowInd == 1) || (this.tabnowInd == 6) || (this.tabnowInd == 4)){  //二全中、二中特、选二连组、特串
                    
                        this.betnum = (this.arr.length-1)*this.arr.length/2;

                    }else if((this.tabnowInd == 2) || (this.tabnowInd == 3) || (this.tabnowInd == 7) || (this.tabnowInd == 8)){  //三全中、三中二、选三连组、选三前组

                        this.betnumthreeFun();

                    }else if((this.tabnowInd == 5) || (this.tabnowInd == 9)){  //四全中、选四前组

                        this.betnumfourFun();

                    }

                }else if(this.game == '六合彩' && this.level == '过关'){
                    if(this.arr.length > 1){
                        this.betnum = 1;
                    }else{
                        this.betnum = 0;
                    }
                }else{
                    this.betnum = this.arr.length;
                }

            },
            //显示隐藏
            isShowFun(ind){
                
                if(this.boxIsShow.indexOf(ind) == -1){
                    this.boxIsShow.push(ind);
                }else{
                    this.boxIsShow.splice(this.boxIsShow.indexOf(ind),1);
                }
            },
            dataHandle(num,item){
                if(this.arr.length < num){
                    this.$vux.toast.text('请至少选择'+ num +'个选项','middle');
                    return;
                }else{
                    this.arrName.push({'item': '选号:'+ item +':$fn', 'rate': this.gamedata.rates['选号:'+ item +':$fn'], 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                    this.editBetMoney = true;
                }
                // console.log(this.arrName);
            },
            interactiveHandle(type,item){
                
                //type  1为山东11选5      2为广东快乐十分   3为六合彩  连肖   4为六合彩  连码
                var _this = this;

                if(type == 1){
                    if(item == '前二组选'){
                        var num = 2;
                    }else if(item == '前三组选'){
                        var num = 3;
                    }
                }else if(type == 2){
                    if((item == '任选二') || (item == '选二连组')){
                        var num = 2;
                    }else if((item == '任选三') || (item == '选三前组')){
                        var num = 3;
                    }else if(item == '任选四'){
                        var num = 4;
                    }else if(item == '任选五'){
                        var num = 5;
                    }
                }else if(type == 3){
                    if((item == '二肖连中') || (item == '二肖连不中') || (item == '二尾连中') || (item == '二尾连不中')){
                        var num = 2;
                    }else if((item == '三肖连中') || (item == '三肖连不中') || (item == '三尾连中') || (item == '三尾连不中')){
                        var num = 3;
                    }else if((item == '四肖连中') || (item == '四肖连不中') || (item == '四尾连中') || (item == '四尾连不中')){
                        var num = 4;
                    }else if((item == '五肖连中') || (item == '五肖连不中') || (item == '五尾连中') || (item == '五尾连不中')){
                        var num = 5;
                    }
                }else if(type == 4){
                    
                    if((item == '二全中') || (item == '二中特') || (item == '选二连组') || (item == '特串')){  //二全中、二中特、选二连组、特串
                        var num = 2;
                    }else if((item == '三全中') || (item == '三中二') || (item == '选三连组') || (item == '选三前组')){  //三全中、三中二、选三连组、选三前组
                        var num = 3;
                    }else if((item == '四全中') || (item == '选四前组')){  //四全中、选四前组
                        var num = 4;
                    }
                }
                
                if(this.arr.length < num){
                    this.$vux.toast.text('请至少选择'+ num +'个选项','middle');
                    return;
                }else{
                    this.$httpGet('/api/bet/combine/'+ this.game + '/' + item,{'balls': this.specialballs}).then(response => {
                        // console.log(response);
                        if(response.status == 200){
                            
                            _this.betdetails = response.data;

                            if(type == 3){

                                for(let k in _this.betdetails){

                                    this.arrName.push({'item': '七码:'+ item +':$fn', 'rate': this.gamedata.rates['七码:'+ item +':$fn'], 'value': 0,'isdel': false,'balls': _this.betdetails[k].split(','),'ballStr': _this.betdetails[k]});

                                }
                                _this.betdetails = [];
                                _this.specialballsStr = '';
                            }else if(type == 4){

                                for(let k in _this.betdetails){

                                    if(item == '二中特'){
                                        _this.arrName.push({'item': '连码:'+ item +':中特', 'rate': _this.gamedata.rates['连码:'+ item +':中二'] + ' / ' + _this.gamedata.rates['连码:'+ item +':中特'], 'value': 0,'isdel': false,'balls': _this.betdetails[k].split(','),'ballStr': _this.betdetails[k]});
                                    }else if(item == '三中二'){
                                        _this.arrName.push({'item': '连码:'+ item +':中三', 'rate': _this.gamedata.rates['连码:'+ item +':中二'] + ' / ' + _this.gamedata.rates['连码:'+ item +':中三'], 'value': 0,'isdel': false,'balls': _this.betdetails[k].split(','),'ballStr': _this.betdetails[k]});
                                    }else{
                                        _this.arrName.push({'item': '连码:'+ item +':$fn', 'rate': _this.gamedata.rates['连码:'+ item +':$fn'], 'value': 0,'isdel': false,'balls': _this.betdetails[k].split(','),'ballStr': _this.betdetails[k]});
                                    }

                                }

                                _this.betdetails = [];
                                _this.specialballsStr = '';
                                
                            }
                        }

                    });

                    if(type == 1){
                        this.arrName.push({'item': '选号:'+ item +':$fn', 'rate': this.gamedata.rates['选号:'+ item +':$fn'], 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                    }else if(type == 2){  
                        this.arrName.push({'item': '连码:'+ item +':$fn', 'rate': this.gamedata.rates['连码:'+ item +':$fn'], 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                    }
                    
                    
                    this.editBetMoney = true;
                }
                // console.log(this.arrName);
            },
            //点击下注
            zeroBetFun(){

                if(this.noBet){
                    this.$vux.toast.text('已封盘不可下注！','middle');
                    return;
                }

                if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){
                    
                    this.arrName = [];
                    if(this.tabnowInd == 0){

                        this.dataHandle(2,'任选二');

                    }else if(this.tabnowInd == 1){

                        this.dataHandle(3,'任选三');

                    }else if(this.tabnowInd == 2){

                        this.dataHandle(4,'任选四');

                    }else if(this.tabnowInd == 3){

                        this.dataHandle(5,'任选五');
                        
                    }else if(this.tabnowInd == 4){

                        this.dataHandle(6,'任选六');

                    }else if(this.tabnowInd == 5){

                        this.dataHandle(7,'任选七');

                    }else if(this.tabnowInd == 6){

                        this.dataHandle(8,'任选八');
                        
                    }else if(this.tabnowInd == 7){

                        this.interactiveHandle(1,'前二组选');
                        
                    }else if(this.tabnowInd == 8){
                        this.interactiveHandle(1,'前三组选');
                    }

                }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){
                    this.arrName = [];
                    if(this.tabnowInd == 0){  //前二直选
                        
                        if((this.zxarr.length == 0) || (this.zxarrs.length == 0)){
                            this.$vux.toast.text('请选择正确的球号后再下注！','middle');
                        }else{
                            var nowitem = '前二直选';
                            
                            for(let onum in this.zxarr){
                                
                                for(let tnum in this.zxarrs){
                                    var totalarr = [];
                                    totalarr.push(this.zxarr[onum],this.zxarrs[tnum]);
                                    this.arrName.push({'item': '选号:'+ nowitem +':$fn', 'rate': this.gamedata.rates['选号:'+ nowitem +':$fn'], 'value': 0,'isdel': false,'balls': totalarr,'ballStr': totalarr.join(',')});
                                }
                            }
                            
                            this.editBetMoney = true;
                        }
                    }else if(this.tabnowInd == 1){  //前三直选

                        if((this.zxarr.length == 0) || (this.zxarrs.length == 0) || (this.zxarrss.length == 0)){
                            this.$vux.toast.text('请选择正确的球号后再下注！','middle');
                        }else{
                            var nowitem = '前三直选';
                            
                            for(let onum in this.zxarr){
                                
                                for(let tnum in this.zxarrs){

                                    for(let thnum in this.zxarrss){

                                        var totalarr = [];
                                        totalarr.push(this.zxarr[onum] , this.zxarrs[tnum] , this.zxarrss[thnum]);
                                        this.arrName.push({'item': '选号:'+ nowitem +':$fn', 'rate': this.gamedata.rates['选号:'+ nowitem +':$fn'], 'value': 0,'isdel': false,'balls': totalarr,'ballStr': totalarr.join(',')});
                                    }
                                    
                                }
                            }
                            
                            this.editBetMoney = true;
                        }
                    }
                }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码')){
                    this.arrName = [];
                    if(this.tabnowInd == 0){
                        this.interactiveHandle(2,'任选二');
                    }else if(this.tabnowInd == 1){
                        this.interactiveHandle(2,'选二连组');
                    }else if(this.tabnowInd == 2){
                        this.interactiveHandle(2,'任选三');
                    }else if(this.tabnowInd == 3){
                        this.interactiveHandle(2,'选三前组');
                    }else if(this.tabnowInd == 4){
                        this.interactiveHandle(2,'任选四');
                    }else if(this.tabnowInd == 5){
                        this.interactiveHandle(2,'任选五');
                    }

                }else if(this.game == '六合彩' && this.level == '合肖'){
                    this.arrName = [];
                    if(this.arr.length < 2){
                        this.$vux.toast.text('请至少选择2个选项','middle');
                        return;
                    }else{
                        this.arrName.push({'item': '特码:合肖:'+ this.itemname , 'rate': this.gamedata.rates['特码:合肖:'+ this.itemname], 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                        this.editBetMoney = true;
                    }
                }else if(this.game == '六合彩' && this.level == '自选不中'){
                    this.arrName = [];
                    if(this.arr.length < 5){
                        this.$vux.toast.text('请至少选择5个选项','middle');
                        return;
                    }else{
                        this.arrName.push({'item': '七码:自选不中:'+ this.itemname , 'rate': this.gamedata.rates['七码:自选不中:'+ this.itemname], 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                        this.editBetMoney = true;
                    }
                }else if(this.game == '六合彩' && this.level == '连肖'){
                    this.arrName = [];
                    if(this.tabnowInd == 0){  //二肖连中
                        this.interactiveHandle(3, '二肖连中');
                    }else if(this.tabnowInd == 1){  //三肖连中
                        this.interactiveHandle(3, '三肖连中');  
                    }else if(this.tabnowInd == 2){  //四肖连中
                        this.interactiveHandle(3, '四肖连中');  
                    }else if(this.tabnowInd == 3){  //五肖连中
                        this.interactiveHandle(3, '五肖连中');  
                    }else if(this.tabnowInd == 4){  //二肖连不中
                        this.interactiveHandle(3, '二肖连不中');
                    }else if(this.tabnowInd == 5){  //三肖连不中
                        this.interactiveHandle(3, '三肖连不中');  
                    }else if(this.tabnowInd == 6){  //四肖连不中
                        this.interactiveHandle(3, '四肖连不中');  
                    }else if(this.tabnowInd == 7){  //五肖连不中
                        this.interactiveHandle(3, '五肖连不中');  
                    }
                }else if(this.game == '六合彩' && this.level == '连尾'){
                    this.arrName = [];
                    if(this.tabnowInd == 0){  //二尾连中
                        this.interactiveHandle(3, '二尾连中');
                    }else if(this.tabnowInd == 1){  //三尾连中
                        this.interactiveHandle(3, '三尾连中');  
                    }else if(this.tabnowInd == 2){  //四尾连中
                        this.interactiveHandle(3, '四尾连中');  
                    }else if(this.tabnowInd == 3){  //五尾连中
                        this.interactiveHandle(3, '五尾连中');  
                    }else if(this.tabnowInd == 4){  //二尾连不中
                        this.interactiveHandle(3, '二尾连不中');
                    }else if(this.tabnowInd == 5){  //三尾连不中
                        this.interactiveHandle(3, '三尾连不中');  
                    }else if(this.tabnowInd == 6){  //四尾连不中
                        this.interactiveHandle(3, '四尾连不中');  
                    }else if(this.tabnowInd == 7){  //五尾连不中
                        this.interactiveHandle(3, '五尾连不中');  
                    }
                }else if(this.game == '六合彩' && this.level == '连码'){

                    this.arrName = [];
                    if(this.tabnowInd == 0){
                        this.interactiveHandle(4,'二全中');
                    }else if(this.tabnowInd == 1){
                        this.interactiveHandle(4,'二中特');
                    }else if(this.tabnowInd == 2){
                        this.interactiveHandle(4,'三全中');
                    }else if(this.tabnowInd == 3){
                        this.interactiveHandle(4,'三中二');
                    }else if(this.tabnowInd == 4){
                        this.interactiveHandle(4,'特串');
                    }else if(this.tabnowInd == 5){
                        this.interactiveHandle(4,'四全中');
                    }else if(this.tabnowInd == 6){
                        this.interactiveHandle(4,'选二连组');
                    }else if(this.tabnowInd == 7){
                        this.interactiveHandle(4,'选三连组');
                    }else if(this.tabnowInd == 8){
                        this.interactiveHandle(4,'选三前组');
                    }else if(this.tabnowInd == 9){
                        this.interactiveHandle(4,'选四前组');
                    }

                }else if(this.game == '六合彩' && this.level == '过关'){
                    this.arrName = [];
                    if(this.arr.length < 2){
                        this.$vux.toast.text('请至少选择2个选项','middle');
                        return;
                    }else{

                        var rateall = 1;
                        for(let i in this.signarr){

                            rateall = parseFloat(rateall) * parseFloat(this.dataS[this.signarr[i]][this.warr[i]].rate);
                        }
                        
                        this.arrName.push({'item': '正码:过关:正一_单' , 'rate': rateall.toFixed(2), 'value': 0,'isdel': false,'balls': this.specialballs,'ballStr': ''});
                        this.editBetMoney = true;
                    }
                }else{

                    if(this.arr.length > 0){
                        this.editBetMoney = true;
                    }else{
                        this.$vux.toast.text('请选择球号后再下注！','middle');
                    }
                }

                
            },
            //下单
            betFun(){
                if(this.betmoney){
                    if(this.betmoney.indexOf('.') != -1){
                        this.$vux.toast.text('请输入正确金额','middle');
                    }else{
                        this.editBetMoney = false;
                        for(let i=0;i<this.arrName.length;i++){
                            this.arrName[i].value = this.betmoney;
                        }

                        //总计金额
                        this.moneyTotal = this.arrName.length * parseFloat(this.betmoney);

                        this.goToBet = true;
                    }
                    
                }else{
                    this.$vux.toast.text('请输入正确金额','middle');
                }
            },
            //下注提交
            goBetFun(){

                var _this = this;
                console.log('下注-------------------',this.arrName);
                let obj = {};
                obj.game = this.game;
                obj.items = [];
                
                for(let i=0;i<this.arrName.length;i++){
                    //判断是否被删除
                    if(!this.arrName[i].isdel){

                        if(this.arrName[i].value){
                            if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码') || (this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选') || (this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码') || (this.game == '六合彩' &&　this.level == '合肖') || (this.game == '六合彩' && this.level == '自选不中') || (this.game == '六合彩' && this.level == '连肖') || (this.game == '六合彩' && this.level == '连尾') || (this.game == '六合彩' && this.level == '过关') || (this.game == '六合彩' && this.level == '连码')){

                                obj.items.push({'item': this.arrName[i].item, 'value': this.arrName[i].value, 'balls': this.arrName[i].balls});

                            }else{
                                var sign = this.dataS[this.arrName[i].index][this.arrName[i].ind];
                                var item = sign.typeName + ':' + sign.groupName + ':' + sign.name;
                                obj.items.push({'item': item, 'value': this.arrName[i].value, 'balls': this.arrName[i].balls});
                            }
                        }
                        
                    }
                    
                }

                if(obj.items.length != 0){
                    _this.$httpPost('/api/bet/bet',obj).then(response => {
                        // console.log(response);
                        if(response.status == 200){
                            
                            _this.betSuccess = true;
                            _this.$emit('openBet');

                        }

                    });
                }else{
                    _this.$vux.toast.text('请输入下注金额','middle');
                }
                
            },
            //取消下注
            goBetCancel(){
                this.goToBet = false;
                this.arr = [];
                this.arrName = [];
                this.betdetails = [];
                this.specialballs = [];
                this.specialballsStr = '';
                this.zxbetnum = 0;
                this.betnum = 0;
                this.zxarr = [];
                this.zxarrs = [];
                this.zxarrss = [];
                this.itemname = '';
                this.tabnowRate = '--';
                this.noBet = false;  //是否封盘
            },
            //删除注单
            delBetOrder(ind){
                this.arrName[ind].isdel = !this.arrName[ind].isdel;
                this.betnum = 0;
                for(let i=0;i<this.arrName.length;i++){
                    if(!this.arrName[i].isdel){
                        this.betnum++
                    }
                    
                }
            },
            //查看投注明细
            lookbetrecordFun(){
                this.$emit('betrecord');
            },
            //tab切换
            handlers(ind,item){
                
                if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){
                    this.arr = [];
                    this.arrName = [];
                    this.specialballs = [];
                    this.specialballsStr = '';
                    this.zxbetnum = 0;
                    this.tabnowInd = ind;
                    this.tabnowRate = this.gamedata.rates['选号:' + item + ':$fn'];
                }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){
                    
                    if(item == '前二直选'){
                        this.dataB = lotterytype.dataTB(this.game,this.level).dataB.slice(0,2);
                        this.dataS = lotterytype.dataTB(this.game,this.level).dataS.slice(0,2);
                    }else if(item == '前三直选'){
                        this.dataB = lotterytype.dataTB(this.game,this.level).dataB;
                        this.dataS = lotterytype.dataTB(this.game,this.level).dataS;
                    }
                    this.arr = [];
                    this.arrName = [];
                    this.specialballs = [];
                    this.specialballsStr = '';
                    this.zxbetnum = 0;
                    this.tabnowInd = ind;
                    this.tabnowRate = this.gamedata.rates['选号:' + item + ':$fn'];
                }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码')){
                    this.arr = [];
                    this.arrName = [];
                    this.specialballs = [];
                    this.specialballsStr = '';
                    this.zxbetnum = 0;
                    this.tabnowInd = ind;
                    this.tabnowRate = this.gamedata.rates['连码:' + item + ':$fn'];
                }else if(this.game == '六合彩' && this.level == '特码'){
                    this.tabnowInd = ind;
                    if(this.tabnowInd == 0){  //特码A

                        this.changeNameFun(1, '特码A');

                    }else if(this.tabnowInd == 1){  //特码B

                        this.changeNameFun(1, '特码B');
                    }
                    
                }else if(this.game == '六合彩' && this.level == '正码特'){

                    this.tabnowInd = ind;
                    if(this.tabnowInd == 0){  //正一特

                        this.changeNameFun(1, '正一特');

                    }else if(this.tabnowInd == 1){  //正二特

                        this.changeNameFun(1, '正二特');
                    }else if(this.tabnowInd == 2){  //正三特

                        this.changeNameFun(1, '正三特');
                    }else if(this.tabnowInd == 3){  //正四特

                        this.changeNameFun(1, '正四特');
                    }else if(this.tabnowInd == 4){  //正五特

                        this.changeNameFun(1, '正五特');
                    }else if(this.tabnowInd == 5){  //正六特

                        this.changeNameFun(1, '正六特');
                    }

                }else if(this.game == '六合彩' && this.level == '连肖'){
                    this.tabnowInd = ind;
                    if(this.tabnowInd == 0){  //二肖连中
                        this.changeNameFun(2, '二肖连中');
                    }else if(this.tabnowInd == 1){  //三肖连中
                        this.changeNameFun(2, '三肖连中');  
                    }else if(this.tabnowInd == 2){  //四肖连中
                        this.changeNameFun(2, '四肖连中');  
                    }else if(this.tabnowInd == 3){  //五肖连中
                        this.changeNameFun(2, '五肖连中');  
                    }else if(this.tabnowInd == 4){  //二肖连不中
                        this.changeNameFun(2, '二肖连不中');
                    }else if(this.tabnowInd == 5){  //三肖连不中
                        this.changeNameFun(2, '三肖连不中');  
                    }else if(this.tabnowInd == 6){  //四肖连不中
                        this.changeNameFun(2, '四肖连不中');  
                    }else if(this.tabnowInd == 7){  //五肖连不中
                        this.changeNameFun(2, '五肖连不中');  
                    }
                    
                }else if(this.game == '六合彩' && this.level == '连尾'){
                    this.tabnowInd = ind;
                    if(this.tabnowInd == 0){  //二尾连中
                        this.changeNameFun(2, '二尾连中');
                    }else if(this.tabnowInd == 1){  //三尾连中
                        this.changeNameFun(2, '三尾连中');  
                    }else if(this.tabnowInd == 2){  //四尾连中
                        this.changeNameFun(2, '四尾连中');  
                    }else if(this.tabnowInd == 3){  //五尾连中
                        this.changeNameFun(2, '五尾连中');  
                    }else if(this.tabnowInd == 4){  //二尾连不中
                        this.changeNameFun(2, '二尾连不中');
                    }else if(this.tabnowInd == 5){  //三尾连不中
                        this.changeNameFun(2, '三尾连不中');  
                    }else if(this.tabnowInd == 6){  //四尾连不中
                        this.changeNameFun(2, '四尾连不中');  
                    }else if(this.tabnowInd == 7){  //五尾连不中
                        this.changeNameFun(2, '五尾连不中');  
                    }
                    
                }else if(this.game == '六合彩' && this.level == '连码'){

                    this.arr = [];
                    this.arrName = [];
                    this.specialballs = [];
                    this.specialballsStr = '';
                    this.zxbetnum = 0;
                    this.tabnowInd = ind;

                    if(this.tabnowInd == 1){  //二中特
                    
                        this.tabnowRate = this.gamedata.rates['连码:二中特:中二'] + ' / ' + this.gamedata.rates['连码:二中特:中特'];

                    }else if(this.tabnowInd == 3){  //三中二

                        this.tabnowRate = this.gamedata.rates['连码:三中二:中二'] + ' / ' + this.gamedata.rates['连码:三中二:中三'];

                    }else{

                        this.tabnowRate = this.gamedata.rates['连码:' + item + ':$fn'];

                    }

                }
                
            },
            //更改dataB、dataS 结构值
            changeNameFun(type,item){
                
                this.arr = [];
                this.arrName = [];
                this.specialballs = [];
                this.specialballsStr = '';
                this.zxbetnum = 0; 

                this.dataB = [item]; 
                for(var i in this.dataB){
                    for(var j in this.dataS[i]){
                        
                        if(this.dataS[i][j].type){

                            if(type == 1){  //六合彩  特码、正码特
                                this.dataS[i][j].typeName = item;
                            }else if(type == 2){  //六合彩  连肖、连尾
                                this.dataS[i][j].groupName = item;
                            }
                            
                        }
                    }
                }

                //更新赔率
                this.rateSetInterval();
                
            },
             //快速选择
            quickChooseFun(type,index,ind){
                
                this.nowChoosedArr = [];
                if(type == 1){
                    for(let i in this.chooseData){
                        
                        for(let j in this.chooseData[i]){
                            this.chooseData[i][j].choose = false;
                        }
                    }
                    this.chooseData[index][ind].choose = true;
                    this.nowChoosedArr.push(this.chooseData[index][ind].name);
                }else if(type == 2){

                    for(let i in this.chooseData){
                        
                        for(let j in this.chooseData[i]){

                            if(this.chooseData[i][j].type == 1){
                                this.chooseData[i][j].choose = false;
                            }

                            if(this.chooseData[i][j].choose){
                                this.nowChoosedArr.push(this.chooseData[i][j].name);
                            }
                            
                        }
                    }
                    this.chooseData[index][ind].choose = !this.chooseData[index][ind].choose;
                    if(this.chooseData[index][ind].choose){
                        this.nowChoosedArr.push(this.chooseData[index][ind].name);
                    }
                }
            },
            //关闭  快速选择
            quickCloseChooseFun(){
                this.quickChooseBox = false;
                this.nowChoosedArr = [];
                for(let i in this.chooseData){
                        
                    for(let j in this.chooseData[i]){
                        this.chooseData[i][j].choose = false;
                    }
                }
            },
            //重置  快速选择
            quickResetChooseFun(){
                this.nowChoosedArr = [];
                this.arr = [];
                this.arrName = [];
                for(let i in this.chooseData){
                        
                    for(let j in this.chooseData[i]){
                        this.chooseData[i][j].choose = false;
                    }
                }
                this.chooseData[18][2].choose = true;
            },
            //选取  快速选择
            quickChoosedFun(){

                for(let i in this.nowChoosedArr){

                    if(i != 0){
                        this.isZero = true;
                    }else{
                        this.isZero = false;
                    }

                    if(!((this.shengxiao.indexOf(this.nowChoosedArr[i]) != -1) && this.isZero)){  //不为生肖或者第一个生肖
                        this.arr = [];
                        this.arrName = [];
                    }else if(!((this.shengxiao.indexOf(this.nowChoosedArr[i]) != -1) && !this.isZero)){  //生肖 但不是第一个生肖   或者  不是生肖
                        
                        this.arrName = [];
                    }

                    if(this.nowChoosedArr[i] == '单码'){
                        this.arr = lotterytype.shengxiaoTB().danma;
                    }else if(this.nowChoosedArr[i] == '小单'){
                        this.arr = lotterytype.shengxiaoTB().xiaodan;
                    }else if(this.nowChoosedArr[i] == '合单'){
                        this.arr = lotterytype.shengxiaoTB().hedan;
                    }else if(this.nowChoosedArr[i] == '双码'){
                        this.arr = lotterytype.shengxiaoTB().shuangma;
                    }else if(this.nowChoosedArr[i] == '小双'){
                        this.arr = lotterytype.shengxiaoTB().xiaoshuang;
                    }else if(this.nowChoosedArr[i] == '合双'){
                        this.arr = lotterytype.shengxiaoTB().heshuang;
                    }else if(this.nowChoosedArr[i] == '大码'){
                        this.arr = lotterytype.shengxiaoTB().dama;
                    }else if(this.nowChoosedArr[i] == '大单'){
                        this.arr = lotterytype.shengxiaoTB().dadan;
                    }else if(this.nowChoosedArr[i] == '合大'){
                        this.arr = lotterytype.shengxiaoTB().heda;
                    }else if(this.nowChoosedArr[i] == '小码'){
                        this.arr = lotterytype.shengxiaoTB().xiaoma;
                    }else if(this.nowChoosedArr[i] == '大双'){
                        this.arr = lotterytype.shengxiaoTB().dashuang;
                    }else if(this.nowChoosedArr[i] == '合小'){
                        this.arr = lotterytype.shengxiaoTB().hexiao;
                    }else if(this.nowChoosedArr[i] == '0头'){
                        this.arr = lotterytype.shengxiaoTB().lingtou;
                    }else if(this.nowChoosedArr[i] == '0尾'){
                        this.arr = lotterytype.shengxiaoTB().lingwei;
                    }else if(this.nowChoosedArr[i] == '5尾'){
                        this.arr = lotterytype.shengxiaoTB().wuwei;
                    }else if(this.nowChoosedArr[i] == '1头'){
                        this.arr = lotterytype.shengxiaoTB().yitou;
                    }else if(this.nowChoosedArr[i] == '1尾'){
                        this.arr = lotterytype.shengxiaoTB().yiwei;
                    }else if(this.nowChoosedArr[i] == '6尾'){
                        this.arr = lotterytype.shengxiaoTB().liuwei;
                    }else if(this.nowChoosedArr[i] == '2头'){
                        this.arr = lotterytype.shengxiaoTB().ertou;
                    }else if(this.nowChoosedArr[i] == '2尾'){
                        this.arr = lotterytype.shengxiaoTB().erwei;
                    }else if(this.nowChoosedArr[i] == '7尾'){
                        this.arr = lotterytype.shengxiaoTB().qiwei;
                    }else if(this.nowChoosedArr[i] == '3头'){
                        this.arr = lotterytype.shengxiaoTB().santou;
                    }else if(this.nowChoosedArr[i] == '3尾'){
                        this.arr = lotterytype.shengxiaoTB().sanwei;
                    }else if(this.nowChoosedArr[i] == '8尾'){
                        this.arr = lotterytype.shengxiaoTB().bawei;
                    }else if(this.nowChoosedArr[i] == '4头'){
                        this.arr = lotterytype.shengxiaoTB().sitou;
                    }else if(this.nowChoosedArr[i] == '4尾'){
                        this.arr = lotterytype.shengxiaoTB().siwei;
                    }else if(this.nowChoosedArr[i] == '9尾'){
                        this.arr = lotterytype.shengxiaoTB().jiuwei;
                    }else if(this.nowChoosedArr[i] == '鼠'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().shu];
                    }else if(this.nowChoosedArr[i] == '龙'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().long];
                    }else if(this.nowChoosedArr[i] == '猴'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().hou];
                    }else if(this.nowChoosedArr[i] == '牛'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().niu];
                    }else if(this.nowChoosedArr[i] == '蛇'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().she];
                    }else if(this.nowChoosedArr[i] == '鸡'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().ji];
                    }else if(this.nowChoosedArr[i] == '虎'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().hu];
                    }else if(this.nowChoosedArr[i] == '马'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().ma];
                    }else if(this.nowChoosedArr[i] == '狗'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().gou];
                    }else if(this.nowChoosedArr[i] == '兔'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().tu];
                    }else if(this.nowChoosedArr[i] == '羊'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().yang];
                    }else if(this.nowChoosedArr[i] == '猪'){
                        this.arr = [...this.arr,...lotterytype.shengxiaoTB().zhu];
                    }else if(this.nowChoosedArr[i] == '红'){
                        this.arr = lotterytype.shengxiaoTB().hong;
                    }else if(this.nowChoosedArr[i] == '绿'){
                        this.arr = lotterytype.shengxiaoTB().lv;
                    }else if(this.nowChoosedArr[i] == '蓝'){
                        this.arr = lotterytype.shengxiaoTB().lan;
                    }else if(this.nowChoosedArr[i] == '红单'){
                        this.arr = lotterytype.shengxiaoTB().hongdan;
                    }else if(this.nowChoosedArr[i] == '绿单'){
                        this.arr = lotterytype.shengxiaoTB().lvdan;
                    }else if(this.nowChoosedArr[i] == '蓝单'){
                        this.arr = lotterytype.shengxiaoTB().landan;
                    }else if(this.nowChoosedArr[i] == '红双'){
                        this.arr = lotterytype.shengxiaoTB().hongshuang;
                    }else if(this.nowChoosedArr[i] == '绿双'){
                        this.arr = lotterytype.shengxiaoTB().lvshuang;
                    }else if(this.nowChoosedArr[i] == '蓝双'){
                        this.arr = lotterytype.shengxiaoTB().lanshuang;
                    }else if(this.nowChoosedArr[i] == '红大'){
                        this.arr = lotterytype.shengxiaoTB().hongda;
                    }else if(this.nowChoosedArr[i] == '绿大'){
                        this.arr = lotterytype.shengxiaoTB().lvda;
                    }else if(this.nowChoosedArr[i] == '蓝大'){
                        this.arr = lotterytype.shengxiaoTB().landa;
                    }else if(this.nowChoosedArr[i] == '红小'){
                        this.arr = lotterytype.shengxiaoTB().hongxiao;
                    }else if(this.nowChoosedArr[i] == '绿小'){
                        this.arr = lotterytype.shengxiaoTB().lvxiao;
                    }else if(this.nowChoosedArr[i] == '蓝小'){
                        this.arr = lotterytype.shengxiaoTB().lanxiao;
                    }else if(this.nowChoosedArr[i] == '全选'){
                        this.arr = lotterytype.shengxiaoTB().allarr;
                    }else if(this.nowChoosedArr[i] == '反选'){

                        for(let a in lotterytype.shengxiaoTB().allarr){
                            if(this.arr.indexOf(lotterytype.shengxiaoTB().allarr[a]) == -1){
                                this.arr.push(lotterytype.shengxiaoTB().allarr[a]);
                            }else{
                                this.arr.splice(this.arr.indexOf(lotterytype.shengxiaoTB().allarr[a]),1);
                            }
                        }
                    }

                    
                    for(let j in this.arr){
                            
                        var num = parseInt(this.arr[j].split(',')[1]) + 1;
                        var item = this.dataS[0][j].typeName + '[' + this.dataS[0][j].groupName +']' + '['+ ((num > 9) ? ''+num:'0'+num) +']';
                        var rate = this.gamedata.rates[this.dataS[0][j].typeName + ':' + this.dataS[0][j].groupName + ':'+ ((num > 9) ? ''+num:'0'+num)];
                        this.arrName.push({'item': item, 'rate': rate, 'value': 0,'isdel': false,'index': 0,'ind': ((num-1 > 9) ? ''+num-1:'0'+num-1), 'balls': [],'ballStr': ''});
                    }
                    
                    //ע��
                    this.betnum = this.arr.length;
                }
                console.log(this.arr,this.arrName);
                
            },
            betnumthreeFun(){
                var len1 = this.arr.length;
                if(len1 >= 3){
                    var a1 = 1;
                    for(var i = 1; i<=len1;i++){
                        a1 = a1*i;
                    }
                    var a2 = 1;
                    for(var i = 1; i<=len1-3;i++){
                        a2 = a2*i;
                    }
                    this.betnum = a1 / (a2 * 3 * 2);
                }
            },
            betnumfourFun(){
                var len1 = this.arr.length;
                if(len1 >= 4){
                    var a1 = 1;
                    for(var i = 1; i<=len1;i++){
                        a1 = a1*i;
                    }
                    var a2 = 1;
                    for(var i = 1; i<=len1-4;i++){
                        a2 = a2*i;
                    }
                    this.betnum = a1 / (a2 * 4 * 3 * 2);
                }
            },
            betnumfiveFun(){
                var len1 = this.arr.length;
                if(len1 >= 5){
                    var a1 = 1;
                    for(var i = 1; i<=len1;i++){
                        a1 = a1*i;
                    }
                    var a2 = 1;
                    for(var i = 1; i<=len1-5;i++){
                        a2 = a2*i;
                    }
                    this.betnum = a1 / (a2 * 5 * 4 * 3 * 2);
                }
            },
           //下注成功
            betSuccessFun(){
                this.betSuccess = false;
                this.goToBet = false;
            },
            //时分秒 倒计时
            hourFun(){
                var _this = this;
                _this.timess = setInterval(function(){
                    
                    if(_this.opentime == '00:00'){  //开盘
                        //调用相应接口
                        clearInterval(_this.timess);
                        _this.opentime = '00:00';
                        _this.rateSetInterval(1);
                    }else{
                        _this.opentime = _this.reciprocaldays(_this.opentime);
                    }

                },1000)

            },
             //天时分秒
            reciprocaldays(time){
                // console.log(time);
                var num = this.dayTransformation(time);
                num--;
                return this.transformationDay(num);
            },
            //天时分秒转时间戳
            dayTransformation(times){
                var ind = times.indexOf('天');
                if(ind > 0){

                    var day = parseInt(times.substring(0,ind));
                    var hour = parseInt(times.substring(ind+1,ind+3));
                    var minute = parseInt(times.substring(ind+4,ind+6));
                    var second = parseInt(times.substring(ind+7,ind+9));
                    var nowtime = day * 60 * 60 * 24 + hour * 60 * 60 + minute * 60 + second;

                }else{
                    var day = 0;
                    if(times.length > 5){    //时分秒
                        var hour = parseInt(times.substring(0,2));
                        var minute = parseInt(times.substring(3,5));
                        var second = parseInt(times.substring(6,8));
                        var nowtime = hour * 60 * 60 + minute * 60 + second;
                    }else{  //分秒
                        var minute = parseInt(times.substring(0,2));
                        var second = parseInt(times.substring(3,5));
                        var nowtime = minute * 60 + second;
                    }
                }
                
                return nowtime;
            },
             //时间戳转天时分秒
            transformationDay(times){
                // console.log(times);
                if (times > 0) {
                    var days = parseInt(times / (60 * 60 *24));
                    if (days > 0) {
                        var hourSecounds = times - days*60*60*24;
                    } else {
                        var hourSecounds = times
                    }
                    var hours = parseInt(hourSecounds / 60 / 60);
                    if (hours > 0) {
                        var minSecouds = times - days*60*60*24 -  hours*60*60
                    } else {
                        var minSecouds = times -  days*60*60*24;
                    }
                    var minutes = parseInt(minSecouds / 60);
                    var seconds = times % 60;
                    
                    var d = true;
                    var h = true;
                    if (days == 0){
                         d= false;
                    }
                    if (hours == 0) {
                        h = false;
                    }
                    
                    if (d) {

                        return days + '天' +  this.add0(hours) + ':' + this.add0(minutes) + ':' + this.add0(seconds);

                    } else {
                        if (h) {
                            return this.add0(hours) + ':' + this.add0(minutes) + ':' + this.add0(seconds);
                        } else {
                            return this.add0(minutes) + ':' + this.add0(seconds);
                        }
                    }

                } else {
                    return '00:00';
                }

            },
            //天、时、分、秒
            dayFun(){
                var _this = this;
                _this.timess = setInterval(function(){
                    
                    if(_this.closetime == '00:00'){  //封盘
                        //调用相应接口
                        clearInterval(_this.timess);
                        _this.closetime = '00:00';
                        _this.closeFun();
                    }else{
                        _this.closetime = _this.reciprocaldays(_this.closetime);
                    }

                },1000)

                _this.times = setInterval(function(){

                    if(_this.resulttime == '00:00'){  //开奖
                         //调用相应接口
                        clearInterval(_this.times);
                        _this.resulttime = '00:00';
                        _this.resultFun();
                    }else{
                        _this.resulttime = _this.reciprocaldays(_this.resulttime);
                    }
                },1000)
            },
            //90 s
            nineinit(){
                var _this = this;
                _this.ninetimeset = setInterval(function(){
                    
                    if(_this.againNine){
                        _this.againNine = false;
                        clearInterval(_this.ninetimeset);
                        _this.ninetime = 90;  //重新开始计时
                        _this.nineinit();
                        
                    }else{
                        if(_this.ninetime == 0){  //90秒
                               //调用相应接口
                            _this.nineFun();
                            _this.ninetime = 90;  //重新开始计时
                        }else{
                            _this.ninetime--;
                        }
                    }

                },1000)
            },
            //时间  补十位
            add0(num){
                return num<10 ? '0'+num : num
            },
            //封盘
            closeFun(){
                // 不可下注
                this.noBet = true;
            },
            //开奖
            resultFun(){
                // 可下注  请求开奖（赔率）、账户信息、开奖结果、两面长龙接口、路珠（beadCount）接口
                this.noBet = false;
                this.rateSetInterval(1);  //开奖（赔率）、开奖结果
                this.refreshClong++;  //两面长龙
                this.$emit('openBet');
            },
            //90秒
            nineFun(){
                // 账户信息、开奖结果、两面长龙、路珠（beadCount）接口
                var i = 0;
                this.rateSetInterval(1);  //开奖（赔率）、开奖结果
                this.refreshClong++;  //两面长龙
                this.$emit('openBet');
            },
        },
        mounted(){
            this.init();
        },
        beforeDestroy(){
            
            clearInterval(this.rateTimer);
            clearInterval(this.times);
            clearInterval(this.timess);
            clearInterval(this.ninetimeset);
        },
        watch: {
            //更换游戏分类
            game: function(now,old){
                if(old){
                    this.ischooseLevel = true;
                    this.levelList(now);
                    this.level = this.levelmenu[0];
                   //当前标题
                    this.$emit('getTit',this.game + ' - ' + this.level);
                    this.dataB = lotterytype.dataTB(this.game,this.level).dataB;
                    this.dataS = lotterytype.dataTB(this.game,this.level).dataS;

                     if(this.game == '六合彩' &&　this.level == '特码'){
                        
                        this.tablist = ['特码A','特码B'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                        
                    }else{
                        this.tablist = [];
                    }
                    //初始化
                    this.goBetCancel();
                    this.rateSetInterval();
                }
            },
            //更换游戏二级分类
            level: function(now,old){
                //
                if(old && ! this.ischooseLevel){
                    
                    //当前标题
                    this.$emit('getTit',this.game + ' - ' + this.level);
                    this.dataB = lotterytype.dataTB(this.game,this.level).dataB;
                    this.dataS = lotterytype.dataTB(this.game,this.level).dataS;

                    if((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')){
                        this.tablist = ['任选二','任选三','任选四','任选五','任选六','任选七','任选八','前二组选','前三组选'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                    }else if((this.game == '山东11选5' &&　this.level == '直选') || (this.game == '广东11选5' &&　this.level == '直选') || (this.game == '江西11选5' &&　this.level == '直选')){
                        this.tablist = ['前二直选','前三直选'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                        this.dataB = this.dataB.slice(0,2);
                        this.dataS = this.dataS.slice(0,2);
                    }else if((this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码')){
                        this.tablist = ['任选二','选二连组','任选三','选三前组','任选四','任选五'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                    }else if(this.game == '六合彩' &&　this.level == '特码'){
                        
                        this.tablist = ['特码A','特码B'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                        
                    }else if(this.game == '六合彩' && this.level == '正码特'){

                        this.tablist = ['正一特','正二特','正三特','正四特','正五特','正六特'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;

                    }else if(this.game == '六合彩' &&　this.level == '连肖'){
                        
                        this.tablist = ['二肖连中','三肖连中','四肖连中','五肖连中','二肖连不中','三肖连不中','四肖连不中','五肖连不中'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                        
                    }else if(this.game == '六合彩' &&　this.level == '连尾'){
                        
                        this.tablist = ['二尾连中','三尾连中','四尾连中','五尾连中','二尾连不中','三尾连不中','四尾连不中','五尾连不中'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;
                        
                    }else if(this.game == '六合彩' && this.level == '连码'){

                        this.tablist = ['二全中','二中特','三全中','三中二','特串','四全中','选二连组','选三连组','选三前组','选四前组'];
                        this.tabnowRate = '--';
                        this.tabnowInd = 0;

                    }else{
                        this.tablist = [];
                    }
                    
                    //初始化
                    this.goBetCancel();
                    this.rateSetInterval();
                }else if(old && this.ischooseLevel){
                    this.ischooseLevel = false;
                }
            },
            //改变下注金额
             arrName: {
                handler(now,old){

                    this.moneyTotal = 0;

                    if((((this.game == '山东11选5' &&　this.level == '连码') || (this.game == '广东11选5' &&　this.level == '连码') || (this.game == '江西11选5' &&　this.level == '连码')) && (this.tabnowInd == 7 || this.tabnowInd == 8)) || (this.game == '广东快乐十分' &&　this.level == '连码') || (this.game == '重庆幸运农场' &&　this.level == '连码') ){
                        //ball里有值
                        if(this.arrName.length != 0){
                            if(this.arrName[0].value){
                                //总计
                                this.moneyTotal = this.betdetails.length * parseFloat(this.arrName[0].value);
                            }
                        }
                        
                    }else{
                        
                        for(let i=0;i<this.arrName.length;i++){
                            if(this.arrName[i].value && !this.arrName[i].isdel){
                                this.moneyTotal += parseFloat(this.arrName[i].value);
                            }
                            
                        }
                    }
                    
                },
                deep: true
            },

        },
    }
</script>
<style scoped>
    .quickchooseBtn{
        margin: 10px auto;
        background:-webkit-linear-gradient(top,#f09800,#d65900);
        color: #fff;
        border:1px solid #aa4500;   
        padding: 3px 5px;
        border-radius: 25px;
    }
    .chooseTitle{
        font-size: 18px;
        padding: 7px 0px;
    }
    .chooseMain{
        padding: 0px 10px 8px;
        overflow-y: auto;
        max-height: 400px;
    }
    .chooseTable{
        line-height: 28px;
    }
    .chooseFooter{
        width: 80%;
        margin: 0px auto;
        padding: 10px 0px 15px;
    }
    .chooseTable td.select{
        background: #ffea00;
    }
</style>
<style>
    .vux-cell-value{
        color: #fff!important;
    }
    .weui-dialog{
        bottom: initial!important;
        width: 100%!important;
        max-width: 100%!important;
    }
    .vux-popover{
        color: #35495e!important;
        background-color: #fff!important;
        border: 1px solid #35495e!important;
        padding: 2px 7px!important;
        left: 0!important;
        max-width: 100%!important;
    }
    .vux-popover-arrow-up{
        left: 28%!important;
    }
    .choose_dialog .weui-dialog{
        bottom: 0!important;
        width: 80%!important;
    }
</style>


